const {extend, getRouter} = require('../../utils/router.js')
const app = getApp()
Component({
  properties:{
    title:String,
    filter:Number
  },
  data: {
    isIpx: app.globalData.isIpx
  },
  ready () {
    this.router = getRouter()
    if (this.router.is === 'pages/index/index' || this.router.name === 'index') {
      this.setData({
        showBack: false
      })
    } else {
      this.setData({
        showBack: true
      })
    }
  },
  methods: {
    back () {
      console.log(this.router.navigateBack())
    }
  }
})
